package com.hspedu.tankgame4;

import java.util.Vector;

/**
 * @author DL5O
 * @version 1.0
 * 自己的坦克
 */
public class Hero extends Tank {
    //定义一个Shot 对象
    private int shotSpeed = 10;

    public Hero(int x, int y, int type, int speed) {
        super(x, y, type, speed);
    }

    public Hero(int x, int y, int type, int speed, int shotSpeed) {
        super(x, y, type, speed);
        this.shotSpeed = shotSpeed;
    }

    public int getShotSpeed() {
        return shotSpeed;
    }

    public void setShotSpeed(int shotSpeed) {
        this.shotSpeed = shotSpeed;
    }

    //射击
    @Override
    public void shotTank() {
        if(shots.size() == 5) return;
        super.shotTank();
    }
}

